Skip to content

feature(signup): migrate simple-signup to standard browser#9969

Open
Rello wants to merge 3 commits into
masterfrom
codex/add-nc-account-setup
Open

feature(signup): migrate simple-signup to standard browser#9969
Rello wants to merge 3 commits into
masterfrom
codex/add-nc-account-setup

Conversation

@Rello
Copy link
Copy Markdown
Collaborator

@Rello Rello commented May 5, 2026

Background

  • The existing Simple-Signup-Process relied on the internal QTWebEngine. This is not available as of macOS sandboxing anymore.
  • Additionally, the QTWebEngine accounted for 50% of the whole desktop client (download & install size)

Overview

  • The Simple-Signup-Process now opens nextcloud.com with the default browser and adds a flow=V3 url parameter
  • This parameter is forwarded from the website (nextcloud-register) to the website backend (nextcloud-theme) and then to the Nextcloud of the provider (prefered_providers)
  • The existing flow based on ocsapirequest (old desktop clients & mobile clients) is not touched. In this case, the Nextcloud will return a nc://login/server:{server}&user:{email}&password:{appPassword} response
  • When a request arrives with flow=V3, the user is logged in in the webUI and additionally, a nc://login/server:{server} response is triggered
  • This response will trigger the existing V2 flow in the client and jump to the "grant access" section right away, without the user needing to perform any additional action

Changes to desktop

  • Added a central nc:// URI dispatcher for routing supported actions.
  • Kept existing local edit handling under nc://open/....
  • Added quick login handling for nc://login/server:{server}
  • The login URI now starts the Flow v2 account login directly with the supplied server URL.
  • Added validation for malformed or unsupported URI actions so they are rejected before falling through to local-edit handling.
  • Added parser coverage for valid login URLs, invalid login URLs, local-edit URLs, and unsupported actions.
  • Added macOS URI dispatch logging to make it visible when an nc:// URL reaches the client.
  • Updated the setup wizard so an incoming login URI restarts an already-open wizard into the Flow v2 login page instead of only raising the existing window.
  • Fixed the provider signup waiting page text so the status text wraps within the available window width.

This pull request depends on the following pull requests to be merged first:

@Rello Rello force-pushed the codex/add-nc-account-setup branch from 3478686 to 0c7cc33 Compare May 8, 2026 06:10
Add NC URI handling for account setup and provider signup flow support.

Signed-off-by: Rello <github@scherello.de>
@Rello Rello force-pushed the codex/add-nc-account-setup branch from 0c7cc33 to ba63b06 Compare May 8, 2026 06:13
@Rello
Copy link
Copy Markdown
Collaborator Author

Rello commented May 8, 2026

Bildschirmaufnahme.2026-05-08.um.13.41.36.mov

Note:
The part where the url is copied an only be performed when the PRs for the website are live, so this is simulated here

@jospoortvliet
Copy link
Copy Markdown
Member

looking at the video - this flow seems reasonable, yeah, it works for me. It's a little more involved, but if it makes things so much easier it is worth it. @jancborchardt agreed?

Copy link
Copy Markdown
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, yeah this seems fine considering the dev effort this saves also.

A nice enhancement would be to open the simple signup page with a parameter that loads only the essentials there to make it super quick and not seem bloated. For example:

  • No navigation, no footer (to not navigate away)
  • No animation for the right block – currently that slows stuff down
  • Focus "Your email address" field

@Rello Rello marked this pull request as ready for review May 20, 2026 04:56
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 618a6c5a35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +68 to +70
} else {
qCWarning(OCC::lcApplication) << "Could not dispatch macOS AppleEvent custom URI scheme request because qApp is not available yet.";
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve AppleEvent URLs when qApp is not ready

In URLEventHandler::handleURLEvent, the new if (qApp) ... else branch drops the URL entirely when qApp is null, which can happen during cold-start handling because this handler is explicitly registered before launch is complete (src/gui/cocoainitializer_mac.mm comment at lines 23-26, and CocoaInitializer is created before Application in src/gui/main.cpp). In that startup window, login/signup deep links are lost and never retried, so the URI flow can fail intermittently on macOS.

Useful? React with 👍 / 👎.

Comment on lines +106 to +107
const auto serverUrlValue = path.mid(QString::fromLatin1(loginServerPathPrefix).size());
const auto serverUrl = QUrl{serverUrlValue};
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse legacy login URI suffixes instead of rejecting them

The new login parser treats everything after server: as a pure server URL (QUrl{serverUrlValue}), so links in the legacy format nc://login/server:<server>&user:<...>&password:<...> are rejected as invalid because &user... becomes part of serverUrlValue. That breaks compatibility for environments still emitting the legacy URI format during rollout, leaving provider signup/login links unhandled instead of falling back.

Useful? React with 👍 / 👎.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
27.1% Coverage on New Code (required ≥ 80%)
B Maintainability Rating on New Code (required ≥ A)
1 New Bugs (required ≤ 0)
61 New Code Smells (required ≤ 0)
D Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@i2h3 i2h3 added os: 🍎 macOS Apple macOS, formerly also known as OS X os: 🚪 Windows os: 🐧 Linux feature: ☁️ GUI System tray icon and menu. labels May 20, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team May 20, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: ☁️ GUI System tray icon and menu. os: 🍎 macOS Apple macOS, formerly also known as OS X os: 🚪 Windows os: 🐧 Linux

Projects

Status: 🏗️ In progress

Development

Successfully merging this pull request may close these issues.

4 participants